home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / PInterfaces / Signal.p < prev    next >
Encoding:
Text File  |  1994-10-20  |  1.5 KB  |  90 lines  |  [TEXT/MPS ]

  1.  
  2. {
  3. Created: Friday, August 2, 1991 at 11:40 PM
  4.  Signal.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.     Signal Handling interface.
  8.     This must be compatible with C's <signal.h>
  9.  
  10.   Copyright Apple Computer, Inc. 1986, 1987, 1988, 1991, 1994
  11.   All rights reserved
  12. }
  13.  
  14.  
  15. {$IFC UNDEFINED UsingIncludes}
  16. {$SETC UsingIncludes := 0}
  17. {$ENDC}
  18.  
  19. {$IFC NOT UsingIncludes}
  20.  UNIT Signal;
  21.  INTERFACE
  22. {$ENDC}
  23.  
  24. {$IFC UNDEFINED UsingSignal AND UNDEFINED __SIGNAL__}
  25. {$SETC UsingSignal := 1}
  26. {$SETC __SIGNAL__ := 1}
  27.  
  28. {$I+}
  29. {$SETC SignalIncludes := UsingIncludes}
  30. {$SETC UsingIncludes := 1}
  31.  
  32.  
  33. {$IFC UNDEFINED __CONDITIONALMACROS__}
  34. {$I ConditionalMacros.p}
  35. {$ENDC}
  36.  
  37. {$ALIGN MAC68K}
  38.  
  39.  
  40. TYPE
  41.     SignalMap =     INTEGER;
  42.     SignalHandler = ^LONGINT;    { Pointer to function }
  43.  
  44. CONST
  45.     SIG_ERR =       -1;            { Returned by IEsignal on error }
  46.     SIG_IGN =        0;
  47.     SIG_DFL =        1;
  48.     SIG_HOLD =        3;
  49.     SIG_RELEASE =    5;
  50.  
  51.     SIGABRT =        $0001;
  52.     SIGINT =        $0002;        { Currently only SIGINT implemented }
  53.     SIGFPE =         $0004;
  54.     SIGILL =        $0008;
  55.     SIGSEGV =        $0010;
  56.     SIGTERM =        $0020;
  57.  
  58. { Signal Handling Functions }
  59.  
  60. {$IFC NOT UNDEFINED __CFM68K__}
  61.     {$IFC NOT UNDEFINED UsingSharedLibs}
  62.         {$PUSH}
  63.         {$LibExport+}
  64.     {$ENDC}
  65. {$ENDC}
  66.  
  67. FUNCTION
  68.     IEsignal(sigNum: LONGINT; sigHdlr: UNIV SignalHandler):
  69.     SignalHandler; C;
  70.  
  71. FUNCTION
  72.     IEraise(sigNum: LONGINT):
  73.     LONGINT; C;
  74.  
  75. {$IFC NOT UNDEFINED __CFM68K__}
  76.     {$IFC NOT UNDEFINED UsingSharedLibs}
  77.         {$POP}
  78.     {$ENDC}
  79. {$ENDC}
  80.  
  81. {$ALIGN RESET}
  82.  
  83. {$SETC UsingIncludes := SignalIncludes}
  84.  
  85. {$ENDC} { UsingSignal }
  86.  
  87. {$IFC NOT UsingIncludes}
  88.  END.
  89. {$ENDC}
  90.